import request from '@/utils/request'

// 查询商户信息列表
export function listOrg(query) {
  return request({
    url: '/system/org/list',
    method: 'get',
    params: query
  })
}

// 开通商户信息
export function openTenant(data) {
  return request({
    url: '/system/org/openTenant',
    method: 'post',
    data: data
  })
}

export function handleFail(userId) {
  return request({
    url: '/system/org/handleFail/'+ userId,
    method: 'post',
  })
}

export function getOrgInfo(userId) {
  return request({
    url: '/system/org/info/' + userId,
    method: 'get'
  })
}

// 上传文件
export function uploadOrgFileByServer(query) {
    return request({
        url: '/system/org/fileUpload',
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data: query
    })
}